<?php
	//开启SESSION
	session_start();
	//判断用户是否登入
	// if(empty($_SESSION['name'])){
	// 	header("refresh:0.1,url=./login.php");
	// 	die();
	// }
	//连接数据库
	include 'php/conn.php';

	$id  = $_GET['id'];

	$sql = 'select * from stuinfo where id='.$id.'';

	$result = mysqli_query($link,$sql);

	$arr = mysqli_fetch_assoc($result);
?>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>修改信息</title>
	<link rel="stylesheet" type="text/css" href="layui1/css/layui.css"/>
	<style>
		.layui-form-radio>i:hover, .layui-form-radioed>i {
			color: #1E9FFF;
		}
		.layui-btn {
			background-color: #1E9FFF;
		}
	</style>
</head>
<body>
	<form class="layui-form" action="" style="width: 500px;margin-top: 30px;">
  		<div class="layui-form-item">
    		<label class="layui-form-label">姓名</label>
    		<div class="layui-input-block">
      			<input type="text" id="name" value="<?php echo $arr['name'];?>" name="name" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>

		  <div class="layui-form-item">
    		<label class="layui-form-label">学号</label>
    		<div class="layui-input-block">
      			<input type="text" id="id" value="<?php echo $arr['id'];?>" name="id" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>

		  <div class="layui-form-item">
    		<label class="layui-form-label">专业</label>
    		<div class="layui-input-block">
      			<input type="text" id="clas" value="<?php echo $arr['clas'];?>" name="clas" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
		  <div class="layui-form-item">
    		<label class="layui-form-label">身份证</label>
    		<div class="layui-input-block">
      			<input type="text" id="uuid" value="<?php echo $arr['uuid'];?>" name="uuid" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
		  <div class="layui-form-item">
    		<label class="layui-form-label">地址</label>
    		<div class="layui-input-block">
      			<input type="text" id="county" value="<?php echo $arr['county'];?>" name="county" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
		  <div class="layui-form-item">
    		<label class="layui-form-label">邮箱</label>
    		<div class="layui-input-block">
      			<input type="text" id="email" value="<?php echo $arr['email'];?>" name="email" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
		  <div class="layui-form-item">
    		<label class="layui-form-label">入学时间</label>
    		<div class="layui-input-block">
      			<input type="text" id="time" value="<?php echo $arr['time'];?>" name="time" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>

  		<div class="layui-form-item">
    		<label class="layui-form-label">性别</label>
			<div class="layui-input-block">
	      		<input disabled type="radio" name="sex" value="男" title="男" <?php if($arr['sex'] == '男'){echo 'checked';} ?>>
	      		<input disabled type="radio" name="sex" value="女" title="女" <?php if($arr['sex'] == '女'){echo 'checked';} ?>>
			</div>
  		</div>
  		<div class="layui-form-item">
    		<label class="layui-form-label">年龄</label>
    		<div class="layui-input-block">
      			<input type="text" id="age" value="<?php echo $arr['age'];?>" name="age" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
  		<div class="layui-form-item">
    		<label class="layui-form-label">手机号码</label>
    		<div class="layui-input-block">
      			<input type="text" id="phone" value="<?php echo $arr['phone_number'];?>" name="phone" required  lay-verify="required" placeholder="未填写" autocomplete="off" class="layui-input" disabled>
    		</div>
  		</div>
  	</form>
  	
  	<script src="layui1/layui.js"></script>
  	<script src="js/verification.js"></script>
  	<script src="js/update.js"></script>
</body>
</html>
